Skip to content

feat(dev): support configurable ports and hosts for multi-workspace and cloudtop - #983

Merged
kyasbal merged 2 commits into
GoogleCloudPlatform:mainfrom
kyasbal:push-xkxorrqruzml
Sep 11, 2026
Merged

feat(dev): support configurable ports and hosts for multi-workspace and cloudtop#983
kyasbal merged 2 commits into
GoogleCloudPlatform:mainfrom
kyasbal:push-xkxorrqruzml

Conversation

@kyasbal

@kyasbal kyasbal commented Sep 11, 2026

Copy link
Copy Markdown
Member

Summary

Support configuring ports and hosts via environment variables for KHI development servers and test runners.

  • Makefile: Support overriding WEB_HOST, WEB_PORT, BACKEND_HOST, BACKEND_PORT, STORYBOOK_HOST, STORYBOOK_PORT, and KARMA_PORT. Automatically append --allowed-hosts when WEB_HOST is set to 0.0.0.0.
  • Angular dev proxy: Read BACKEND_HOST and BACKEND_PORT with fallback to HOST and PORT. Automatically map 0.0.0.0 to 127.0.0.1 for the HTTP proxy target.
  • Karma: Configure test server port via KARMA_PORT, bind to 127.0.0.1, and specify --remote-debugging-port=0 in headless Chrome flags to prevent debugging port conflicts across multiple workspaces.

…nd cloudtop

Support configuring ports and hosts via environment variables for KHI development servers and test runners.

- Makefile: allow overriding WEB_HOST, WEB_PORT, BACKEND_HOST, BACKEND_PORT, STORYBOOK_HOST, STORYBOOK_PORT, and KARMA_PORT. Add --allowed-hosts flag automatically when WEB_HOST is 0.0.0.0.
- Angular proxy: forward to BACKEND_HOST and BACKEND_PORT, normalizing 0.0.0.0 to 127.0.0.1 for HTTP proxy target.
- Karma: configure port from KARMA_PORT, bind to 127.0.0.1, and set --remote-debugging-port=0 to avoid debugging port collisions in headless Chrome.
@kyasbal
kyasbal requested review from RyuSA and jyane as code owners September 11, 2026 06:28
@kyasbal kyasbal added the type:feature New feature or request label Sep 11, 2026
@kyasbal
kyasbal requested a review from kkuchima as a code owner September 11, 2026 06:28
@kyasbal kyasbal added area:frontend Web frontend application and UI components area:devenv Development environment, Makefile, and build tooling labels Sep 11, 2026
@kyasbal
kyasbal requested review from K53 and renamoo as code owners September 11, 2026 06:28

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request parameterizes the host and port configurations for the frontend, backend, Storybook, and Karma servers across Makefiles, VS Code configurations, and web configuration files. The review feedback correctly points out two issues: the VS Code task regex needs to match 127.0.0.1 in addition to localhost to prevent tasks from hanging, and the --allowed-hosts flag in build.mk must be provided with a value (like all) when WEB_HOST is 0.0.0.0 to prevent ng serve from failing.

Comment thread .vscode/tasks.json Outdated
Comment thread scripts/make/build.mk
@kyasbal
kyasbal added this pull request to the merge queue Sep 11, 2026
Merged via the queue into GoogleCloudPlatform:main with commit 479d42c Sep 11, 2026
17 checks passed
@kyasbal
kyasbal deleted the push-xkxorrqruzml branch September 11, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:devenv Development environment, Makefile, and build tooling area:frontend Web frontend application and UI components type:feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant